﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net.WebSockets;
using System.Threading.Tasks;
using XiAnAirport.Models;

namespace XiAnAirport.ElevatorWebSocket
{
    public interface IWebSocketManage
    {
        ConcurrentDictionary<string, WebSocket> Socket { get; set; }
        ConcurrentDictionary<int, ConcurrentDictionary<string, WebSocket>> AreaSocket { get; set; }
        ConcurrentDictionary<int, ConcurrentDictionary<string, WebSocket>> SingleElevatorSocket { get; set; }
        ConcurrentDictionary<string, WebSocket> ElevatorListSocket { get; set; }
        ConcurrentDictionary<string, WebSocket> FaultReportSocket { get; set; }
        ConcurrentDictionary<string, WebSocket> HomePageSocket { get; set; }
        ConcurrentDictionary<string, WebSocket> KoneHomePageSocket { get; set; }
        ConcurrentDictionary<string, WebSocket> PromptSockets { get; set; }
        ConcurrentDictionary<string, WebSocket> LoginSockets { get; set; }
        public Task<bool> PushMessage(LiftStateALL elevatorState);

        public Task<bool> PushFaultMessage(string msg);

        public Task<bool> PushElevatorMessage(LiftStateALL elevatorState);

        public Task<bool> PushTwinkleMessage(LiftStateALL elevatorState);

        public Task<bool> PushAreaMessage(int areaid, LiftStateALL elevatorState);
        public Task<bool> PushElevatorMessage(int elevatorid, LiftStateALL elevatorState);
        public Task<bool> PushElevatorListMessage(string msg);

        public Task<bool> PushFaultReportMessage(ElevatorFault elevatorFault);
        public Task<bool> PushNoticeMessage(string message);
        public Task<bool> PushKoneHomeMessage(string message);
        public Task<bool> PushPromptMessage(string message);
        public Task<bool> PushLoginMessage(string name, string message);
    }
}
